package com.yang.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @TableName pet
 */
@TableName(value ="pet")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Pet implements Serializable {
    /**
     * 
     */
    @TableId
    private String id;

    /**
     * 
     */
    private String ownerId;

    /**
     * 
     */
    private String petName;

    /**
     * 
     */
    private Integer speed;

    /**
     * 
     */
    private Integer attack;

    /**
     * 
     */
    private Integer defence;

    public Integer getScore() {
        return (this.attack + this.speed + this.defence) / 3;
    }

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}